<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>tree: Module Index</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->

<h1>Modules</h1>
<ul>

	<li>
		<a href="../modules/base.html">base</a>
	</li>

	<li>
		<a href="../modules/bin.html">bin</a>
	</li>

	<li>
		<a href="../modules/debug.html">debug</a>
	</li>

	<li>
		<a href="../modules/fstable.html">fstable</a>
	</li>

	<li>
		<a href="../modules/getopt.html">getopt</a>
	</li>

	<li>
		<a href="../modules/io.html">io</a>
	</li>

	<li>
		<a href="../modules/lcs.html">lcs</a>
	</li>

	<li>
		<a href="../modules/list.html">list</a>
	</li>

	<li>
		<a href="../modules/math.html">math</a>
	</li>

	<li>
		<a href="../modules/mbox.html">mbox</a>
	</li>

	<li>
		<a href="../modules/object.html">object</a>
	</li>

	<li>
		<a href="../modules/package.html">package</a>
	</li>

	<li>
		<a href="../modules/parser.html">parser</a>
	</li>

	<li>
		<a href="../modules/set.html">set</a>
	</li>

	<li>
		<a href="../modules/std.html">std</a>
	</li>

	<li>
		<a href="../modules/strbuf.html">strbuf</a>
	</li>

	<li>
		<a href="../modules/string.html">string</a>
	</li>

	<li>
		<a href="../modules/table.html">table</a>
	</li>

	<li><strong>tree</strong></li>
	
</ul>



<!-- File list -->

<h1>Files</h1>
<ul>

	<li>
		<a href="../files/base.html">base.lua</a>
	</li>

	<li>
		<a href="../files/bin.html">bin.lua</a>
	</li>

	<li>
		<a href="../files/debug_ext.html">debug_ext.lua</a>
	</li>

	<li>
		<a href="../files/debug_init.html">debug_init.lua</a>
	</li>

	<li>
		<a href="../files/fstable.html">fstable.lua</a>
	</li>

	<li>
		<a href="../files/getopt.html">getopt.lua</a>
	</li>

	<li>
		<a href="../files/io_ext.html">io_ext.lua</a>
	</li>

	<li>
		<a href="../files/lcs.html">lcs.lua</a>
	</li>

	<li>
		<a href="../files/list.html">list.lua</a>
	</li>

	<li>
		<a href="../files/math_ext.html">math_ext.lua</a>
	</li>

	<li>
		<a href="../files/mbox.html">mbox.lua</a>
	</li>

	<li>
		<a href="../files/modules.html">modules.lua</a>
	</li>

	<li>
		<a href="../files/object.html">object.lua</a>
	</li>

	<li>
		<a href="../files/package_ext.html">package_ext.lua</a>
	</li>

	<li>
		<a href="../files/parser.html">parser.lua</a>
	</li>

	<li>
		<a href="../files/set.html">set.lua</a>
	</li>

	<li>
		<a href="../files/std.html">std.lua</a>
	</li>

	<li>
		<a href="../files/strbuf.html">strbuf.lua</a>
	</li>

	<li>
		<a href="../files/strict.html">strict.lua</a>
	</li>

	<li>
		<a href="../files/string_ext.html">string_ext.lua</a>
	</li>

	<li>
		<a href="../files/table_ext.html">table_ext.lua</a>
	</li>

	<li>
		<a href="../files/tree.html">tree.lua</a>
	</li>

	<li>
		<a href="../files/xml.html">xml.lua</a>
	</li>

</ul>






</div><!-- id="navigation" -->

<div id="content">

<h1>Module <code>tree</code></h1>

<p>Tables as trees.</p>





<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#clone">clone</a>&nbsp;(t, nometa)</td>
	<td class="summary">Make a deep copy of a tree, including any metatables </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#metatable.__index">metatable.__index</a>&nbsp;(tr, i)</td>
	<td class="summary">Tree <code>__index</code> metamethod.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#metatable.__newindex">metatable.__newindex</a>&nbsp;(tr, i, v)</td>
	<td class="summary">Tree <code>__newindex</code> metamethod.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#new">new</a>&nbsp;(t)</td>
	<td class="summary">Make a table into a tree </td>
	</tr>

</table>






<br/>
<br/>



<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="clone"></a><strong>clone</strong>&nbsp;(t, nometa)</dt>
<dd>
Make a deep copy of a tree, including any metatables


<h3>Parameters</h3>
<ul>
	
	<li>
	  t: table
	</li>
	
	<li>
	  nometa: if non-nil don't copy metatables
	</li>
	
</ul>






<h3>Return value:</h3>
copy of table



</dd>




<dt><a name="metatable.__index"></a><strong>metatable.__index</strong>&nbsp;(tr, i)</dt>
<dd>
Tree <code>__index</code> metamethod.


<h3>Parameters</h3>
<ul>
	
	<li>
	  tr: tree
	</li>
	
	<li>
	  i: non-table, or list of indices <code>{i<sub>1</sub> ... i<sub>n</sub>}</code>
	</li>
	
</ul>






<h3>Return value:</h3>
<code>tr[i]...[i<sub>n</sub>]</code> if i is a table, or <code>tr[i]</code> otherwise



</dd>




<dt><a name="metatable.__newindex"></a><strong>metatable.__newindex</strong>&nbsp;(tr, i, v)</dt>
<dd>
Tree <code>__newindex</code> metamethod. Sets <code>tr[i<sub>1</sub>]...[i<sub>n</sub>] = v</code> if i is a table, or <code>tr[i] = v</code> otherwise


<h3>Parameters</h3>
<ul>
	
	<li>
	  tr: tree
	</li>
	
	<li>
	  i: non-table, or list of indices <code>{i<sub>1</sub> ... i<sub>n</sub>}</code>
	</li>
	
	<li>
	  v: value
	</li>
	
</ul>








</dd>




<dt><a name="new"></a><strong>new</strong>&nbsp;(t)</dt>
<dd>
Make a table into a tree


<h3>Parameters</h3>
<ul>
	
	<li>
	  t: table
	</li>
	
</ul>






<h3>Return value:</h3>
tree



</dd>


</dl>






</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>
